<template>
  <view class="container">
    <!-- 团队卡片列表 -->
    <view class="card" v-for="(item, index) in teamList" :key="index">
      <view class="card-header">
        <view class="leader-info">
          <text class="title">赵君</text>
          <text class="phone">13888888888</text>
        </view>
        <text class="check-detail">查看明细 ></text>
      </view>

      <view class="divider"></view>

      <view class="card-content">
        <view class="info-item">
          <view class="label-row">
            <view class="icon-wrapper">
              <image
                src="https://xzthealth-1317438654.cos.ap-guangzhou.myqcloud.com/tempImage/1730692688672846508702b.png"
                class="icon"
              ></image>
            </view>
            <text class="label">下级人数</text>
          </view>
          <text class="value">36</text>
        </view>

        <!-- <view class="center-divider"></view> -->

        <view class="info-item">
          <view class="label-row">
            <view class="icon-wrapper red">
              <image
                src="https://xzthealth-1317438654.cos.ap-guangzhou.myqcloud.com/tempImage/1730692688672846509dfe9.png"
                class="icon"
              ></image>
            </view>
            <text class="label">团队金额</text>
          </view>
          <text class="value">1,354.54元</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      teamList: [1, 2, 3], // 示例数据，用于循环显示3个卡片
    };
  },
};
</script>

<style lang="scss">
.container {
  padding: 20rpx;
  background-color: #f5f5f5;
}

.card {
  background-color: #ffffff;
  border-radius: 16rpx;
  padding: 24rpx;
  margin-bottom: 20rpx;

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20rpx;

    .leader-info {
      display: flex;
      align-items: center;

      .title {
        font-size: 32rpx;
        font-weight: 500;
        color: #333;
        margin-right: 16rpx;
      }

      .phone {
        font-size: 28rpx;
        color: #666;
      }
    }

    .check-detail {
      font-size: 24rpx;
      color: #999;
    }
  }

  .divider {
    height: 2rpx;
    background-color: #f5f5f5;
    margin-bottom: 20rpx;
  }

  .card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    .info-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;

      .label-row {
        display: flex;
        align-items: center;
        margin-bottom: 8rpx;
      }

      .icon-wrapper {
        width: 40rpx;
        height: 40rpx;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #fff5e6;
        border-radius: 8rpx;
        margin-right: 12rpx;

        &.red {
          background-color: #fff0f0;
        }

        .icon {
          width: 24rpx;
          height: 24rpx;
        }
      }

      .label {
        font-size: 28rpx;
        color: #666;
      }

      .value {
        font-size: 32rpx;
        color: #333;
        font-weight: 500;
      }
    }

    .center-divider {
      width: 2rpx;
      height: 80rpx;
      background-color: #f5f5f5;
      margin: 0 30rpx;
    }
  }
}
</style>
